<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" 
%><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" 
%><%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" 
%><%@ page contentType="text/html;charset=ISO-8859-1"
%><html:html locale="true">
    <head>
        <title><bean:message key="asociacion.title"/></title>
        <html:base/>
        <script type="text/javascript" src="../js/prototype.js"></script>
        <script type="text/javascript">
            function formulario(){
                var periodoAbs = "<bean:write property="periodoAbs" name="FAsociacion"></bean:write>";
                $("tipo"+periodoAbs[0]).checked = true;
                actualizarMenuSelect(periodoAbs[0]);    
                $('numero').selectedIndex = periodoAbs.substring(1);
                
            }
            
            function colocarPeriodoAbs(tipo){
                var tipoNuevo = (tipo) ? tipo : $('30454').value[0];
                var valor = $('numero').value;
                $('30454').value = tipoNuevo + $('numero').value;
                actualizarMenuSelect(tipoNuevo);
                $('numero').selectedIndex = valor;
            }
        
            function actualizarMenuSelect(tipoNuevo){
                if(tipoNuevo == "t"){
                    $('numero').length = 16
                    $('numero').options[1] = new Option('0','Seleccione');
                    $('numero').options[1] = new Option('1','1');
                    $('numero').options[2] = new Option('2','2');
                    $('numero').options[3] = new Option('3','3');
                    $('numero').options[4] = new Option('4','4');
                    $('numero').options[5] = new Option('5','5');
                    $('numero').options[6] = new Option('6','6');
                    $('numero').options[7] = new Option('7','7');
                    $('numero').options[8] = new Option('8','8');
                    $('numero').options[9] = new Option('9','9');
                    $('numero').options[10] = new Option('10','10');
                    $('numero').options[11] = new Option('11','11');
                    $('numero').options[12] = new Option('12','12');
                    $('numero').options[13] = new Option('13','13');
                    $('numero').options[14] = new Option('14','14');
                    $('numero').options[15] = new Option('15','15');
                }else
                    if(tipoNuevo == "v" || tipoNuevo == "p"){
                    $('numero').length = 5
                    $('numero').options[1] = new Option('0','Seleccione');
                    $('numero').options[1] = new Option('1','1');
                    $('numero').options[2] = new Option('2','2');
                    $('numero').options[3] = new Option('3','3');
                    $('numero').options[4] = new Option('4','4');
                }
            }
            
            
        </script>
        <link rel="stylesheet" type="text/css" href="../css/style.css"></link>
<style type="text/css">
div#box30450 {width: 400px; margin: 40px auto; }
form#30450 {float: left; margin: 0; padding: 0; display: inline; width: 400px; }
form#30450 p {float: left; margin: 0; padding: 0; display: inline; }
form#30450 label {float: left; margin: 0; padding: 0; display: inline; overflow: hidden; }
form#30450 input {float: left; margin: 0; padding: 0; display: inline; }
  form#30450 p#30453_C {clear: both; width: 400px; }
  form#30450 p#30453_C label {clear: both; width: 400px; }
  form#30450 p#30453_C input {clear: both; width: 396px; }
  form#30450 p#30451_C {clear: both; width: 400px; }
  form#30450 p#30451_C label {clear: both; width: 400px; }
  form#30450 p#30451_C input {clear: both; width: 396px; }
  form#30450 p#30452_C {clear: both; width: 400px; }
  form#30450 p#30452_C label {clear: both; width: 400px; }
  form#30450 p#30452_C input {clear: both; width: 396px; }
  form#30450 p#30455_C {clear: both; width: 400px; }
  form#30450 p#30455_C label {clear: both; width: 400px; }
  form#30450 p#30455_C input {clear: both; width: 396px; }
  form#30450 p#30456_C {clear: both; width: 400px; }
  form#30450 p#30456_C label {clear: both; width: 400px; }
  form#30450 p#30456_C input {clear: both; width: 396px; }
  form#30450 p#30454_C {clear: both; width: 400px; }
  form#30450 p#30454_C label {clear: both; width: 400px; }
  form#30450 p#30454_C input {clear: both; width: 396px; }

</style>
    </head>
    <body onload="formulario();">
        
        <div id="header">
            <div id="title"><bean:message key="asociacion.title"/></div>
            <div id="menu">
                <ul id="nav">
                    <li><html:link action="/AsociacionElim.do" paramId="idAsociacion" paramName="idAsociacion"><bean:message key="asociacion.label1"/></html:link></li>
                    <li>&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;</li>
                    <li><html:link action="/AsociacionModalidadCrearI.do" paramId="idModalidad" paramName="idModalidad"><bean:message key="asociacion.label2"/></html:link></li>
                    <li>&nbsp;&nbsp;&nbsp;  &nbsp;&nbsp;&nbsp;</li>
                    <li><html:link action="/ModalidadI.do" paramId="idModalidad" paramName="idModalidad"><bean:message key="asociacion.label3"/></html:link></li>

                </ul>
            </div>
        </div>
        <div id="body_wrapper">
            <div id="body">
                <div id="split">
                    <div class="top"></div>
                    <div id="left">
                        <div class="content">
                            ${empty msg ? "" : msg}
                <div class="box30450"><html:form styleId="F30450" action="/AsociacionAct.do">
                  <html:hidden property="idAsociacion"/><table>
                  <tr><td id="30451_C"><label for="30451"><bean:message key="FAsociacion.label1"/></label></td><td>&nbsp;<html:select styleId="30451" property="requisito"><html:optionsCollection property="listRequisitos"/></html:select></td></tr>
                  <html:hidden styleId="30455" property="modalidad"/>
                  <tr><td id="30454_C"><label for="30454"><bean:message key="FAsociacion.label5"/></label></td><td>&nbsp;
                  <label for="tipo">Trimestre</label><input type="radio" id="tipot" name="tipo" value="t" onclick="colocarPeriodoAbs(this.value)">
                  </td><td>&nbsp;
                  <label for="tipo">Verano</label><input type="radio" id="tipov" name="tipo" value="v" onclick="colocarPeriodoAbs(this.value)">
                  </td><td>&nbsp;
                  <label for="tipo">Pasant&iacute;a Larga</label><input type="radio" id="tipop" name="tipo" value="p" onclick="colocarPeriodoAbs(this.value)">
                  </td><td>&nbsp;
                  <select id="numero" onchange="colocarPeriodoAbs()">
                      <option value="0">0
                      <option value="1">1
                      <option value="2">2
                      <option value="3">3
                      <option value="4">4
                      <option value="5">5
                      <option value="6">6   
                      <option value="7">7
                      <option value="8">8
                      <option value="9">9
                      <option value="10">10
                      <option value="11">11
                      <option value="12">12
                      <option value="13">13
                      <option value="14">14
                      <option value="15">15
                  </select>
                <html:hidden styleId="30454" property="periodoAbs" />
                </td></tr></table>
                  <html:submit styleClass="button"><bean:message key="asociacion.label0"/></html:submit>
                </html:form></div>

                        </div>
                    </div>
                    <div id="right"><jsp:include page="/ppal/menu.jsp" flush="true"/></div>
                    <div class="clearer"></div>
                    <div class="bottom"></div>
                </div>
                <div class="clearer"></div>
            </div>
            <div class="clearer"></div>
        </div>
        <div id="end_body"></div>
         <h3 class="title"></h3>
        <div id="footer"> <bean:message key="bottom.label"/> </div>
        
    </body>
</html:html>